<!-- Form: Edit password -->
<%= error_messages_for 'user' %>

<div class="fieldsets">
    <fieldset>
        <legend>Change your password</legend>
        <% form_tag :action => 'update_password', :id => @current_user do -%>
        <div class="inputs">
	        <label for="old_password">Current password:</label><br/>
	        <%= password_field_tag("old_password", value = nil, :size => 32)   %>
        </div>
        <div class="inputs">
	        <label for="user_password">New password:</label><br/>
	        <%= password_field 'user', 'password', :size => 32 %>
        </div>
        <div class="inputs">
	        <label for="user_password_confirmation">New password confirmation:</label>
	        <br/>	<%= password_field  'user', 'password_confirmation', :size => 32  %>
        </div>
        <%= submit_tag 'Change' %>
        <% end %> 
    </fieldset>   
<p>
<%= link_to 'Back', request.env['HTTP_REFERER'] if request.env['HTTP_REFERER']%>
</p>
</div>
<!-- End of form -->